<%--
  Created by IntelliJ IDEA.
  User: jester
  Date: 2018/6/15
  Time: 15:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="/static/plugins/echarts.common.min.js"></script>
</head>
<body>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    window.onload=function (){
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        title: {
            text:'按学员付款方式',

            subtext:"${groupName}"
        },
        tooltip: {
            show:true

        },
        legend: {
            data:['已付总款','未付总款'],
            x:'left'
        },
        toolbox: {
            show : true,
            feature : {
                mark:{
                    show:true
                },
                dataView:{
                    show:true,
                    readOnly:true
                },
                magicType:{
                    show:true,
                    type:['line','bar']
                },
                restore:{
                    show:true
                },
                saveAsImage : {
                    show : true
                }
            }
        },
        xAxis: [
            {
                type: 'category'

            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                "name": "销量",
                "type": "bar",

                markPoint : {
                    data : [
                        {type : 'max', name: '最大值'},
                        {type : 'min', name: '最小值'}
                    ]
                },
                markLine : {
                    data : [
                        {type : 'average', name: '平均值'}
                    ]
                }

            }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    }
</script>
</body>
</body>
</html>
